package com.fsh.subject.infra.basic.mapper;

import com.fsh.subject.infra.basic.entity.SubjectLiked;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *  表数据库访问层
 *
 * @author fsh
 * @since 2024-01-17 19:11:10
 */
@Repository
public interface SubjectLikedDao extends BaseMapper<SubjectLiked> {

    /**
     * 批量插入题目点赞数据
     */
    void insertBatch(@Param("subjectLikedList") List<SubjectLiked> subjectLikedList);

    /**
     * 我的点赞计总数
     */
    int countByCondition(SubjectLiked subjectLiked);


    /**
     * 分页查询点赞列表
     */
    List<SubjectLiked> queryPage(@Param("subjectLiked") SubjectLiked subjectLiked,
                                 @Param("start") int start,
                                 @Param("pageSize") Integer pageSize);
}

